package cn.ywang.pattern.jdk;

import java.util.Observable;

/**
 * @author BeatificWang
 * @date 2019/3/20 23:17
 */
public class Tester extends Observable {

	private String name;

	public Tester(String name) {
		this.name = name;
	}

	public String getName() {
		return this.name;
	}

	/**
	 * 提交一个缺陷，设置状态变更，并通知观察者
	 *
	 * @param issue
	 */
	public void reportIssue(Issue issue) {
		System.out.println("提交一个缺陷，缺陷详情：" + issue);
		this.setChanged();
		this.notifyObservers(issue);
	}
}
